//文章
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const articleSchema = new Schema({
    author: {
        type: Schema.Types.ObjectId,
        ref: "user"
    },
    title: String,
    category: Array,
    content: String,
    contentpro:String,
    Introduction:String,
    date: {
        type: Date,
        default: Date.now
    },
    views: {
        type: Number,
        default:0
    },
    comment: {
        type:Schema.Types.ObjectId,
        ref:"comment"
    },
    background:{
        type:String,
        default:null
    }
});

var article = mongoose.model("article", articleSchema);
module.exports = article;